package com.zerdoor.service.impl;

import com.zerdoor.dao.AdvertDao;
import com.zerdoor.service.AdvertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by xiaoji on 2014/11/20.
 */
@Service
public class AdvertServiceImpl implements AdvertService {
    @Autowired
    private AdvertDao advertDao;

    @Override
    public List<Map<String, Object>> selectAllAdverts(Map<String, String> map) {
        return advertDao.selectAllAdverts(map);
    }

    @Override
    public void addAdvert(Map<String, String> map) throws Exception {
        advertDao.addAdvert(map);
    }

    @Override
    public void updateAdvert(Map<String, String> map) throws Exception {
        advertDao.updateAdvert(map);
    }

    @Override
    public Map<String, Object> selectAdvertById(Map<String, String> map) {
        return advertDao.selectAdvertById(map);
    }

    @Override
    public void deleteAdvert(Map<String, String> map) throws Exception {
        advertDao.deleteAdvert(map);
    }

    @Override
    public List<Map<String, Object>> selectAdvertGroup() {
        return advertDao.selectAdvertGroup();
    }
}
